#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>

typedef int DateType;
struct SeqList
{
    DateType* a;
    size_t size;
    size_t capacity;
};
typedef struct SeqList SeqList;

void SeqListInit(SeqList* ps);
void SeqListDestory(SeqList* ps);
void CheckCapacity(SeqList* ps);

void SeqListPrint(SeqList* ps);
void SeqListPushBack(SeqList* ps, DateType x);
void SeqListPushFront(SeqList* ps, DateType x);
void SeqListPopFront(SeqList* ps);
void SeqListPopBack(SeqList* ps);

// 顺序表查找
int SeqListFind(SeqList* ps, DateType x);
// 顺序表在pos位置插入x
void SeqListInsert(SeqList* ps, size_t pos, DateType x);
// 顺序表删除pos位置的值
void SeqListErase(SeqList* ps, size_t pos);